package com.sz.designpattern.behavior11.iterator;

public class Client {
    public static void main(String[] args) {
        Aggregate aggregate = new DeliveryAggregate();

        aggregate.add("1111");
        aggregate.add("222");

        aggregate.add("333");
        aggregate.add("444");

        Iterator iterator = aggregate.iterator();
        while (iterator != null && iterator.hasNext()){
            Object tel = iterator.next();
            System.out.println("Client.main "+tel);
        }

    }
}
